import QtQuick 2.6
import QtQuick.Layouts 1.1

import "../../Base/UiBase"
import "../../Base/Config"
import FunctionalItem 1.0

Item {
    id: menuRoot
    property bool activated: false
    anchors.fill: parent

    MouseArea {
        anchors.fill: parent
        onClicked: activated = !activated
    }

    MouseArea {
        parent: mainRoot
        anchors.fill: parent
        visible: activated
        onClicked: activated = false
    }

    Item {
        parent: mainRoot
        width: menuRoot.width
        height: menuRoot.height
        visible: activated
        FlickableAutoPositioner {
            syncItem: menuRoot
            view: menuRoot.parent.ListView.view
        }
        Row {
            anchors.right: parent.right
            height: parent.height
            Rectangle {
                color: "#d92c23"
                width: height
                height: parent.height
                MouseArea {
                    anchors.fill: parent
                    Text {
                        anchors.centerIn: parent
                        text: qsTr("找他点评  ", "点击老师后的弹出界面-找他点评  ")
                        font.pixelSize: Size.titleFont
                        wrapMode: Text.WrapAnywhere
                        width: font.pixelSize * 2 + 1
                    }
                    onClicked: {
                        //mainRoot.communicate(teacher)
                        activated = false
                    }
                }
            }
        }
    }
}
